class Solution {
public:

bool isselfDividing(int number)
{
	int temp = number;
	int div = 0;
	while (temp > 0)
	{
		div = temp % 10;
		if (div == 0)
		{
			return false;
		}

		if (number%div != 0)
			return false;
		temp = temp / 10;
	}

	return true;
}

vector<int> selfDividingNumbers(int left, int right) {

	vector<int> numbers;
	if (left>right)
		return numbers;

	for (int i = left; i<=right; i++)
	{
		if (isselfDividing(i))
			numbers.push_back(i);
	}

	return numbers;
}
};